<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        body{
            font-size: 12px;
        }
        table, table td{
            border: 1px solid black;
        }
    </style>
</head>
<body>
<div>
    title: {{title}} | keyword: {{keyword}} |
    order by: {{order}} |
    page num: {{page_num}} | size: {{size}}
</div>
<div>
      <ul class="pagination">
      {% for page in page_info %}
          <li style="display: inline-block; min-width: 20px;">{% if not page.2 %}<a href="{{ page.1 }}">{{ page.0 }}</a>{% else %}{{ page.0 }}{% endif %}</li>
      {% endfor %}
</div>
<div>
    <a href="{% url 'webserver:insert' %}">添加任务</a>
    <a href="{% url 'webserver:controler' %}">启动进程</a>
</div>
<table>
    <tr>
        <td>序号</td>
        <td>id</td>
        <td>title</td>
        <td>func</td>
        <td>args</td>
        <td>priority</td>
        <td>cron_type</td>
        <td>cron_params</td>

        <td>pid</td>
        <td>start_time</td>
        <td>end_time</td>
        <td>status</td>
        <td>last_update_time</td>
        <td>created_time</td>
        <td>操作</td>
    </tr>
    {% for item in items%}
    <tr>
        <td>{{forloop.counter}}</td>
        <td><a href="{{ item.pos_url }}" target="_blank">{{item.id}}</a></td>
        <td>{{item.title}}</td>
        <td>{{item.func}}</td>
        <td>{{item.args}}</td>
        <td>{{item.priority}}</td>
        <td>{{item.cron_type}}</td>
        <td>{{item.cron_params}}</td>
        <td>{{item.pid}}</td>
        <td>{{item.start_time}}</td>
        <td>{{item.end_time}}</td>
        <td>{{item.status}}</td>
        <td>{{item.last_update_time}}</td>
        <td>{{item.created_time}}</td>
        <td>
            <a href="{% url 'webserver:show_item' item.id %}" target="_blank">查看日志</a> |
            <a href="{% url 'webserver:update' item.id %}" target="_blank">修改</a> |
            <a href="{% url 'webserver:start_task' item.id %}" target="_self">开始</a> |
            <a href="{% url 'webserver:shutdown_task' item.id %}" target="_self">停止</a> |
            <a href="{% url 'webserver:delete' item.id %}" target="_self">删除</a> |

        </td>
    </tr>
    {% endfor %}
</table>

</body>
</html>